package com.mrd.gtimp.business.entity;

import com.mrd.gtimp.base.entity.User;

import org.hibernate.annotations.GenericGenerator;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * <p>
 * application name: sample
 * <p>
 * copyright: Copyright@2012 明睿达科技有限公司
 *
 * 附件记录基础类，抽象出公共信息
 *
 * @author luob
 */
@Entity(name = "T_BIZ_BASE_ATTACHMENT")
@Inheritance(strategy = InheritanceType.JOINED)
@org.hibernate.annotations.Entity(dynamicUpdate = true)
public abstract class BaseAttachment {

  @Id
  @GeneratedValue(generator = "paymentableGenerator")
  @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
  @Column(name = "ID")
  private String id;


  /**
   * 存放位置
   */
  @Column(name = "PATH")
  private String path;
  /**
   * 附件名称
   */
  @Column(name = "NAME")
  private String name;
  /**
   * 备注
   */
  @Column(name = "REMARK")
  private String remark;

  @ManyToOne
  @JoinColumn(name = "CREATOR")
  private User CREATOR;

  private Date ctime;

  @Column(name = "REPLACENAME")
  private String replacename;


  @Column(name = "BILL_NO")
  private String bill_no;

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getPath() {
    return path;
  }

  public void setPath(String path) {
    this.path = path;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }

  public User getCREATOR() {
    return CREATOR;
  }

  public void setCREATOR(User CREATOR) {
    this.CREATOR = CREATOR;
  }

  public Date getCtime() {
    return ctime;
  }

  public void setCtime(Date ctime) {
    this.ctime = ctime;
  }

  public String getReplacename() {
    return replacename;
  }

  public void setReplacename(String replacename) {
    this.replacename = replacename;
  }

  public String getBill_no() {
    return bill_no;
  }

  public void setBill_no(String bill_no) {
    this.bill_no = bill_no;
  }
}
